🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / ui / src / commonTest / kotlin / org / meshtastic / core / ui / emoji / EmojiPickerViewModelTest.kt
Displaying Raw • Download
core/ui/src/commonTest/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerViewModelTest.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 2.21 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ui.emoji
Tff7b72import T7ee787dev.mokkery.MockMode
Tff7b72import T7ee787dev.mokkery.answering.returns
Tff7b72import T7ee787dev.mokkery.every
Tff7b72import T7ee787dev.mokkery.matcher.any
Tff7b72import T7ee787dev.mokkery.mock
Tff7b72import T7ee787dev.mokkery.verify
Tff7b72import T7ee787kotlinx.coroutines.flow.MutableStateFlow
Tff7b72import T7ee787org.meshtastic.core.repository.CustomEmojiPrefs
Tff7b72import T7ee787kotlin.test.BeforeTest
Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertEquals
Tff7b72import T7ee787kotlin.test.assertNotNull
Tff7b72class T56d364EmojiPickerViewModelTest Tb4b4b4{
Tff7b72private Tff7b72lateinit Tff7b72var Te6edf3viewModelTb4b4b4: Te6edf3EmojiPickerViewModel
Tff7b72private Tff7b72val Te6edf3customEmojiPrefsTb4b4b4: Te6edf3CustomEmojiPrefs Tff7b72= Te6edf3mockTb4b4b4(Te6edf3MockModeTb4b4b4.Te6edf3autofillTb4b4b4)
Tff7b72private Tff7b72val Te6edf3emojiRepository Tff7b72= Te6edf3EmojiRepositoryTb4b4b4(Tb4b4b4)
Tff7b72private Tff7b72val Te6edf3frequencyFlow Tff7b72= Te6edf3MutableStateFlowTff7b72<Tffa657String?Tff7b72>Tb4b4b4(Tff7b72nullTb4b4b4)
Tff7b72private Tff7b72val Te6edf3skinToneFlow Tff7b72= Te6edf3MutableStateFlowTb4b4b4(T79c0ff0Tb4b4b4)
Tf0883e@BeforeTest
Tff7b72fun Td2a8ffsetUpTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3every Tb4b4b4{ Te6edf3customEmojiPrefsTb4b4b4.Te6edf3customEmojiFrequency Tb4b4b4} Te6edf3returns Te6edf3frequencyFlow
Te6edf3every Tb4b4b4{ Te6edf3customEmojiPrefsTb4b4b4.Te6edf3preferredSkinToneIndex Tb4b4b4} Te6edf3returns Te6edf3skinToneFlow
Te6edf3viewModel Tff7b72= Te6edf3EmojiPickerViewModelTb4b4b4(Te6edf3customEmojiPrefsTb4b4b4, Te6edf3emojiRepositoryTb4b4b4)
Tb4b4b4}
Tf0883e@Test
Tff7b72fun Td2a8fftestInitializationTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertNotNullTb4b4b4(Te6edf3viewModelTb4b4b4)
Tb4b4b4}
Tf0883e@Test
Tff7b72fun Td2a8ff`customEmojiFrequency property delegates to prefs`Tb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3frequencyFlowTb4b4b4.Te6edf3value Tff7b72= Ta5d6ff"Ta5d6ff👍=10Ta5d6ff"
Te6edf3assertEqualsTb4b4b4(Ta5d6ff"Ta5d6ff👍=10Ta5d6ff"Tb4b4b4, Te6edf3viewModelTb4b4b4.Te6edf3customEmojiFrequencyTb4b4b4)
Te6edf3every Tb4b4b4{ Te6edf3customEmojiPrefsTb4b4b4.Te6edf3setCustomEmojiFrequencyTb4b4b4(Te6edf3anyTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4} Te6edf3returns Tffa657Unit
Te6edf3viewModelTb4b4b4.Te6edf3customEmojiFrequency Tff7b72= Ta5d6ff"Ta5d6ff❤️=5Ta5d6ff"
Te6edf3verify Tb4b4b4{ Te6edf3customEmojiPrefsTb4b4b4.Te6edf3setCustomEmojiFrequencyTb4b4b4(Ta5d6ff"Ta5d6ff❤️=5Ta5d6ff"Tb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s